<!--
 * @Author: xuxu12138 1718324422@qq.com
 * @Date: 2024-07-03 14:08:39
 * @LastEditors: xuxu12138 1718324422@qq.com
 * @LastEditTime: 2024-07-12 17:05:31
 * @FilePath: /things-admin/src/view/member/OrderRecords.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="core_content">
      <!-- <div class="header">
        <el-button type="primary" class="el-icon-plus">添加设备</el-button>
      </div> -->
      <div class="content">
        <Table border :columns="columns" highlight-row :data="data"> 
          <template slot-scope="{ row }" slot="action">
          <div style="white-space: nowrap">
            <Button
              size="small"
              type="info"
            >详情
            </Button>
          </div>
        </template>
        </Table>
        <div style="display: flex;justify-content: space-between;margin-top: 20px;">
        <div></div>
        <Page :total="total" show-sizer/>
      </div>
      </div>
    </div>
  </template>
  
  <script>
  import {fetchMaintainList} from '@/base/api/MemberApi'
  export default {
    data() {
      return {
        pageIndex:1,
        pageSize:10,
        columns: [
          {
            title: "购买单号",
            key: "OrderNumber"
          },
          {
            title: "消费者手机号",
            key: "MobilePhone"
          },
          {
            title: "收货人",
            key: "ConsigneeName"
          },
          {
            title: "下单时间",
            key: "SubmitTime"
          },
          {
            title: "订单状态",
            key: "OrderType"
          },
          {
            title: "实付款",
            key: "PaymentAmount"
          },
          {
            title: "总金额",
            key: "Amount"
          },
          {
            title: "总数量",
            key: "Quantity"
          },
          {
            title: "操作",
            slot: "action",
            fixed:'right'
          }
        ],
        data: [
  
        ],
        total:0
      };
    },
    methods:{
      fetchMaintainList() {
        let params = {
            pageIndex:this.pageIndex,
            pageSize:this.pageSize,
            orderState:0,
            sortDirection:'ASC',
            phone:this.$route.query.phone,
            createEnd : '',
            createBegin: ''
        }
        fetchMaintainList(params).then(res=>{
             this.data = res.data.items
        })
      }
    },
    mounted() {
      this.fetchMaintainList()
    }
  };
  </script>
  
  <style lang="less" scoped>
  .header {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .content {
    margin-top: 40px;
  }
  </style>
